package com.Register.mapper;

import com.Register.entity.SkillDocument;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface SkillDocumentMapper extends BaseMapper<SkillDocument> {

    @Select("select id from skill_document where active_status=1 and deleted=0")
    List<Long> getAllActiveId();

    @Update("update skill_document set views=#{views} where id=#{id} and deleted=0")
    void updateActiveDocViews(@Param("id") Long docId,@Param("views") Long views);
}
